slint::include_modules!();

fn main () -> Result<(), slint::PlatformError> {
    let ui = AppWindow::new()?;

    let ui_handle = ui.as_weak();
    ui.on_request_increase_value(move || {
        let ui: AppWindow = ui_handle.unwrap();
        ui.set_counter(ui.get_counter() + 1);
    });
    let ui_handle0 = ui.as_weak();
    ui.on_request_decrease_value(move||{
        let ui: AppWindow = ui_handle0.unwrap();
        ui.set_counter(ui.get_counter() - 1);
    });   
    ui.run()
}
